]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
power: Display single digit minutes correctly
authorSebastian Keller <sebastian-keller@gmx.de>
Sun, 11 Aug 2013 17:54:22 +0000 (19:54 +0200)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 12 Aug 2013 18:41:04 +0000 (14:41 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=705803

js/ui/status/power.js

index 07834b9f8aac2e54933c1b2abae151206d17e743..3e7681671685af31405933aedaa1fc5bb1ae2ec8 100644 (file)
@@ -72,12 +72,12 @@ const Indicator = new Lang.Class({
 
         if (state == UPower.DeviceState.DISCHARGING) {
             // Translators: this is <hours>:<minutes> Remaining (<percentage>)
-            return _("%d\u2236%d Remaining (%d%%)".format(hours, minutes, percentage));
+            return _("%d\u2236%02d Remaining (%d%%)".format(hours, minutes, percentage));
         }
 
         if (state == UPower.DeviceState.CHARGING) {
             // Translators: this is <hours>:<minutes> Until Full (<percentage>)
-            return _("%d\u2236%d Until Full (%d%%)".format(hours, minutes, percentage));
+            return _("%d\u2236%02d Until Full (%d%%)".format(hours, minutes, percentage));
         }
 
         // state is one of PENDING_CHARGING, PENDING_DISCHARGING